package com.xhg.xhgone.service.impl;

import com.xhg.xhgone.dao.UserDao;
import com.xhg.xhgone.model.User;
import com.xhg.xhgone.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
  @Autowired private UserDao userDao;

  @Override
  public User login(User user) {
    return userDao.login(user);
  }

  @Override
  @Transactional
 // @Cacheable(value = "common")
  public List<User> getUser(User user) {
    return userDao.getUser(user);
  }
}
